
#include "pr2000_support.h"

#if defined(__HOST_MICOM_SYSTEM__)

#include <stdio.h>
#include <stdlib.h>

#if defined(STM32F10X_HD)
#include "stm32f10x.h"
#else
//#include "stm8s.h"
#endif

#include "pr2000_drvcommon.h"
#include "pr2000.h"
#include "pr2000_func.h"
#include "pr2000_support.h"
#include "pr2000_user_config.h"

_drvHost gDrvHost[MAX_PR2000_CHIPCNT] = {0, };
_drvHost *gpDrvHost[MAX_PR2000_CHIPCNT] = {NULL, };
#ifdef SUPPORT_REG_SAVEDUMP //support pr2000 register save dump.
_stRegSaveDump gRegSaveDump[MAX_PR2000_CHIPCNT] = {0, };
_stRegSaveDump *gpRegSaveDump[MAX_PR2000_CHIPCNT] = {NULL, };
#endif // SUPPORT_REG_SAVEDUMP //support pr2000 register save dump.

int gFindPr2000SlvAddrCnt = 0;

uint32_t pr2000_poll(int chipInx)
{
        uint32_t mask = 0; 

        Dbg("(chip:%d)\n", chipInx);

	if(chipInx >= gFindPr2000SlvAddrCnt)  return(mask);

	if(gDrvHost[chipInx].wqPoll == 0)  return(mask);

	if( (gDrvHost[chipInx].stPR2000_Isr.stUserPoll.bitIrq != 0) )
        {    
                mask = POLLIN | POLLRDNORM;
        }    

        return mask;
}

#elif defined (__HOST_LINUX_SYSTEM__) //defined(__HOST_MICOM_SYSTEM__)

#include "pr2000_drvcommon.h"
#include "pr2000.h"
#include "pr2000_func.h"
#include "pr2000_support.h"
#include "pr2000_user_config.h"

_drvHost gDrvHost[MAX_PR2000_CHIPCNT] = {0, };
#endif//defined(__HOST_LINUX_SYSTEM__)


